package cli.menu;


/**
 * BudgetBuoy
 * 
 * Simplify your personal expense management
 * 
 * @team cs2103jan13-w15-3j
 */

//--------------------------------------------------------------

/**
 * State Class
 * 
 * Description: 
 * 
 * 
 * @package   tools.menu
 * @author    Lai Yong Quan (A0080909Y)
 * @editor(s) -
 */
public enum State{
	
	MAINMENU, ADDENTRYMENU, ALERTSETTINGS,  MANAGEPAYMENTMODES, TRACKEXPENSES, GENERALREPORT, 
	ADDEXPENSE,ADDLOANPAYMENT,ADDINCOME,  ADDCASHLOAN, 
	
	 SEARCHSELECTFILTER, SEARCHBYNAME,SEARCHBYDATE,
	
	 ADDPAYMENTMODE,RENAMEPAYMENTMODE,MERGEPAYMENTMODES,DELETEPAYMENTMODE,
	 
	 //added states for receipt tracking
	 ADDRECEIPT, SEARCHRECEIPTSELECTFILTER, SEARCHBYITEMNAME, SEARCHBYITEMPRICE, SEARCHBYPURCHASINGDATE,
	 SEARCHBYSHOP,SEARCHBYMODEL, SEARCHBYBRAND,SEARCHBYSERIALNUM,
	 
	MANAGECATEGORIES,ADDCATEGORY,RENAMECATEGORY,MERGECATEGORIES,DELETECATEGORY, 
	EXCELPOWERED, EXCELIMPORT, EXCELEXPORT, EXCELLOAD;
	
	//for your convenience
	public void template(){
		switch(this){
		case MAINMENU:
		case ADDENTRYMENU:
		case ADDEXPENSE:
		case ADDLOANPAYMENT:
		case ADDINCOME:
		case ADDCASHLOAN:
		case ADDCATEGORY:
		case RENAMECATEGORY:
		case MERGECATEGORIES:
		case DELETECATEGORY:
		case ALERTSETTINGS:
		case MANAGECATEGORIES:
		case MANAGEPAYMENTMODES:
		case SEARCHSELECTFILTER:
		case SEARCHBYNAME:
		case SEARCHBYDATE:
		case TRACKEXPENSES:
		case GENERALREPORT:
		case ADDPAYMENTMODE:
		case RENAMEPAYMENTMODE:
		case MERGEPAYMENTMODES: 
		case DELETEPAYMENTMODE:
		case ADDRECEIPT:
		case SEARCHRECEIPTSELECTFILTER:
		case SEARCHBYITEMNAME:
		case SEARCHBYPURCHASINGDATE:
		case SEARCHBYSHOP:
		case SEARCHBYSERIALNUM:
		case SEARCHBYMODEL:
		case SEARCHBYBRAND:
		case EXCELPOWERED:
		case EXCELEXPORT:
		case EXCELLOAD :
			
		default:
		}
		
	}
	
	
	public State run(){
		switch(this){
		case MAINMENU:
			return MainMenu.runMenu();
		case ADDENTRYMENU:
			return AddEntryMenu.runMenu();
		case ADDEXPENSE:
			return AddExpense.runMenu();
		case ADDLOANPAYMENT:
			return AddLoanPayment.runMenu();
		case ADDINCOME:
			return AddIncome.runMenu();
		case ADDCASHLOAN:
			return AddCashLoan.runMenu();
		case ADDCATEGORY:
			return AddCategory.runMenu();
		case RENAMECATEGORY:
			return RenameCategory.runMenu();
		case MERGECATEGORIES:
			return MergeCategories.runMenu();
		case DELETECATEGORY:
			return DeleteCategory.runMenu();
		case ALERTSETTINGS:
			return AlertSettings.runMenu();
		case MANAGECATEGORIES:
			return ManageCategories.runMenu();
		case MANAGEPAYMENTMODES:
			return ManagePaymentModes.runMenu();
		case SEARCHSELECTFILTER:
			return SearchSelectFilter.runMenu();
		case SEARCHBYNAME:
			return SearchByName.runMenu();
		case SEARCHBYDATE:
			return SearchByDate.runMenu();
		case TRACKEXPENSES:
			return TrackExpenses.runMenu();
		case GENERALREPORT:
			return GeneralReport.runMenu();
		case ADDPAYMENTMODE:
			return AddPaymentMode.runMenu();
		case RENAMEPAYMENTMODE:
			return RenamePaymentMode.runMenu();
		case MERGEPAYMENTMODES: 
			return MergePaymentModes.runMenu();
		case DELETEPAYMENTMODE:
			return DeletePaymentMode.runMenu();
		case ADDRECEIPT:
			return AddReceipt.runmenu();
		case SEARCHRECEIPTSELECTFILTER:
			return SearchReceiptSelectFilter.runMenu();
		case SEARCHBYITEMNAME:
			return SearchByItemName.runMenu();
		case SEARCHBYPURCHASINGDATE:
			return SearchByPurchasingDate.runMenu();
		case SEARCHBYSHOP:
			return SearchByShop.runMenu();
		case SEARCHBYSERIALNUM:
			return SearchBySerialNum.runMenu();
		case SEARCHBYMODEL:
			return SearchByModel.runMenu();
		case SEARCHBYBRAND:
			return SearchByBrand.runMenu();
		case EXCELPOWERED:
			return ExcelPowered.runMenu();
		case EXCELEXPORT:
		case EXCELLOAD :
		default:
			return MainMenu.runMenu();
		}
		
	}
	
	
	
	/*
	public State run(CLI cli){
		switch(this){
		case MAINMENU:
			return MainMenu.runMenu(cli);
		case ADDENTRYMENU:
			return AddEntryMenu.runMenu(cli);
		case ADDEXPENSE:
			return AddExpense.runMenu(cli);
		case ADDLOANPAYMENT:
			return AddLoanPayment.runMenu(cli);
		case ADDINCOME:
			return AddIncome.runMenu(cli);
		case ADDCASHLOAN:
			return AddCashLoan.runMenu(cli);
		case ADDCATEGORY:
			return AddCategory.runMenu(cli);
		case RENAMECATEGORY:
			return RenameCategory.runMenu(cli);
		case MERGECATEGORIES:
			return MergeCategories.runMenu(cli);
		case DELETECATEGORY:
			return DeleteCategory.runMenu(cli);
		case ALERTSETTINGS:
			return AlertSettings.runMenu(cli);
		case MANAGECATEGORIES:
			return ManageCategories.runMenu(cli);
		case MANAGEPAYMENTMODES:
			return ManagePaymentModes.runMenu(cli);
		case SEARCHSELECTFILTER:
			return SearchSelectFilter.runMenu(cli);
		case SEARCHBYNAME:
			return SearchByName.runMenu(cli);
		case SEARCHBYDATE:
			return SearchByDate.runMenu(cli);
		case TRACKEXPENSES:
			return TrackExpenses.runMenu(cli);
		case GENERALREPORT:
			return GeneralReport.runMenu(cli);
		case ADDPAYMENTMODE:
			return AddPaymentMode.runMenu(cli);
		case RENAMEPAYMENTMODE:
			return RenamePaymentMode.runMenu(cli);
		case MERGEPAYMENTMODES: 
			return MergePaymentModes.runMenu(cli);
		case DELETEPAYMENTMODE:
			return DeletePaymentMode.runMenu(cli);
		case ADDEXPENSEWITHRECEIPT:
		//	return AddExpenseWithReceipt.runMenu(cli);
		default:
			return MainMenu.runMenu(cli);
		}
		
	}
	
	*/
	
	
}